package com.by.service.impl;

import com.by.bean.Organize;
import com.by.bean.Role;
import com.by.mapper.RoleMapper;
import com.by.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author HY
 * @version 1.0
 * @description
 * @date 2025/2/17
 * @since JDK21
 */
@Service
public class RoleServiceImpl implements RoleService {


    @Autowired
    RoleMapper roleMapper;

    @Override
    public int save(Role role) {
        return  roleMapper.save(role);

    }

    @Override
    public int update(Role role) {
        return roleMapper.update(role);

    }

    @Override
    public int delete(int id) {
        return roleMapper.delete(id);

    }

    @Override
    public List<Role> query() {
        return roleMapper.query();
    }

    @Override
    public List<Role> queryByName(String name , int status) {
        return roleMapper.queryByName(name,status);
    }

}
